#!/bin/bash

#贺怡琳
sqoop import \
--connect jdbc:mysql://192.168.88.80:3306/scrm \
--username root \
--password 123456 \
--query "select *,'2024-08-22' as dt from customer_relationship WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_customer_relationship \
-m 1

sqoop import \
--connect jdbc:mysql://192.168.88.80:3306/scrm \
--username root \
--password 123456 \
--query "select *,'2024-08-22' as dt from employee WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_employee \
-m 1

sqoop import \
--connect jdbc:mysql://192.168.88.80:3306/scrm \
--username root \
--password 123456 \
--query "select *,'2024-08-22' as dt from itcast_clazz WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_itcast_clazz \
-m 1

#朱纯聪
sqoop import \
--username root \
--password 123456 \
--connect jdbc:mysql://hadoop01:3306/scrm \
--query "select *, '2024-08-22' as dt from customer_appeal WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_customer_appeal \
-m 1

sqoop import \
--username root \
--password 123456 \
--connect jdbc:mysql://hadoop01:3306/scrm \
--query "select *, '2024-08-22' as dt from scrm_department WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_scrm_department \
-m 1

sqoop import \
--username root \
--password 123456 \
--connect jdbc:mysql://hadoop01:3306/scrm \
--query "select *, '2024-08-22' as dt from customer_clue WHERE 1=1 and \$CONDITIONS" \
--hcatalog-database oe_ods \
--hcatalog-table t_customer_clue \
-m 1
